﻿using System;
using zhangmenren.Db;
using System.Threading.Tasks;
using System.Collections.Generic;
using zhangmenren.Models;

namespace zhangmenren.IService
{
    public interface ICommentServic: IDependency
    {
		/// <summary>
		/// 根据作品标识进行查找
		/// </summary>
		/// <param name="workId"></param>
		/// <returns></returns>
        Task<IEnumerable<CommentEntity>> FindByWorkId(int workId);

		/// <summary>
		/// 添加评论
		/// </summary>
		/// <param name="entity"></param>
		/// <returns></returns>
        Task<int> Add(CommentEntity entity);

		/// <summary>
		/// 删除评论
		/// </summary>
		/// <param name="id"></param>
		/// <returns></returns>
		Task<int> Del(int id);
        Task<int> Up(int id,string up);

        /// <summary>
        /// 查询评论列表
        /// </summary>
        /// <returns></returns>
        Task<IEnumerable<CommentEntity>> Select();

        Task<IEnumerable<CommentEntity>> FindByZMId(int zmid);

    }
}
